Field of the Invention
The present invention relates to a technique for coding moving images (video) for the compression of moving images (video), and more particularly, to a technique for controlling the code amount in the compression of moving images (video).
Description of the Background Art
In the compression of moving images (video), the code amount is typically adjusted in units of relatively long periods of time. For example, the code amount is controlled in units of Group Of Pictures (GOPs) or in units of frames. For the control in units of frames, the amount of code to be allocated to each frame is set, and the amount of code to be generated for each frame is controlled not to exceed the set code amount. For example, the code amount to be generated is controlled not to exceed the set code amount by, for example, adjusting a quantization parameter for each macroblock included in the frame.
For the control in units of GOPs or in units of frames, the code amount is adjusted in units of long periods of time. This control allows the code amount to have a relatively large peak value, and thus achieves a higher image quality. However, a longer delay time occurs in the compression of moving images (video) as the code amount is adjusted in longer periods of time. Under stringent requirements to reduce delays, such as when the moving images are transferred in real time, the code amount needs to be controlled in the shortest possible periods of time.
Patent Literature 1 describes a technique for controlling the code amount by setting a target code amount in units shorter than frames, or in units of predetermined numbers of macroblocks less than the total number of macroblocks included in one frame.